package com.kaifamiao.jdbc.core;

public class Employee {

    private Integer id;
    private String name;
    private String job;
    private Double salary;

    public Employee(Integer id, String name, String job, Double salary) {
        this.id = id;
        this.name = name;
        this.job = job;
        this.salary = salary;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append( "{ " );
        builder.append( "\"id\": " + id );
        builder.append( ", " );
        builder.append( "\"name\": \"" + name + "\"");
        builder.append( ", " );
        builder.append( "\"job\": \"" + job + "\"");
        builder.append( ", " );
        builder.append( "\"salary\": " + salary );
        builder.append( " }" );
        return builder.toString();
    }

}
